<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="static/jquery-3.7.1.min.js"></script>
</head>

<body>
    <div>
        <h2 id="app"></h2>
        <input type="text" name="todo" id="todo-input"></input>
    </div>
</body>
<script>
    $("#todo-input").on("input", function () {
        let val = $(this).val();
        $("#app").html(val);
    })
</script>

</html>